import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [{
  path: "/:catchAll(.*)",
  redirect: "/"
},
{
  path: '/',
  name: 'Home',
  meta: { title: '首页' },
  component: () => import('@/views/home.vue'),
}, {
  path: '/pledge',
  name: 'Pledge',
  meta: { title: '质押' },
  component: () => import('@/views/pledge.vue'),
}, {
  path: '/about',
  name: 'About',
  meta: { title: '关于' },
  component: () => import('@/views/about.vue'),
}, {
  path: '/ecoMap',
  name: 'EcoMap',
  meta: { title: '生态图' },
  component: () => import('@/views/ecoMap.vue'),
}, {
  path: '/economics',
  name: 'Economics',
  meta: { title: '代币经济学' },
  component: () => import('@/views/economics.vue'),
}, {
  path: '/howToBuy',
  name: 'HowToBuy',
  meta: { title: '购买引导' },
  component: () => import('@/views/howToBuy.vue'),
}, {
  path: '/roadMap',
  name: 'RoadMap',
  meta: { title: '路线图' },
  component: () => import('@/views/roadMap.vue'),
},{
  path: '/ido',
  name: 'IDO',
  meta: { title: 'IDO' },
  component: () => import('@/views/IDO.vue'),
},{
  path: '/pledge/pledgeDetails',
  name: 'PledgeDetails',
  meta: { title: '质押' },
  component: () => import('@/views/pledgeDetails.vue'),
}]

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
